﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            int[] array = new int[] { 0, 1, 2, 3 };

            this.Repeater1.DataSource = array;
            this.Repeater1.DataBind();

            RepeaterItem header = this.Repeater1.Controls[0] as RepeaterItem;
            RepeaterItem footer
                = this.Repeater1.Controls[this.Repeater1.Controls.Count - 1]
                    as RepeaterItem;

            (header.FindControl("Label1") as Label).Text = "This is Header ";
            (footer.FindControl("Label2") as Label).Text = "This is Footer ";
        }
    }
    protected void Repeater1_ItemCommand(object source, RepeaterCommandEventArgs e)
    {
        switch (e.CommandName)
        {
            case "Delete":
                break;
            case "Edit":
                break;
        }

    }
    protected void Repeater1_ItemCreated(object sender, RepeaterItemEventArgs e)
    {

    }
    protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {

    }
}